<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Brython speed tests</title>
<link rel="stylesheet" href="/brython.css">

<link rel="stylesheet" href="console.css">

<script src="../tests/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="../tests/ace/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" src="../src/brython_builtins.js"></script>
<script type="text/javascript" src="../src/version_info.js"></script>
<script type="text/javascript" src="../src/py2js.js"></script>
<script type="text/javascript" src="../src/loaders.js"></script>
<script type="text/javascript" src="../src/py_object.js"></script>
<script type="text/javascript" src="../src/py_type.js"></script>
<script type="text/javascript" src="../src/py_utils.js"></script>
<script type="text/javascript" src="../src/py_sort.js"></script>
<script type="text/javascript" src="../src/py_builtin_functions.js"></script>
<script type="text/javascript" src="../src/py_exceptions.js"></script>
<script type="text/javascript" src="../src/py_range_slice.js"></script>
<script type="text/javascript" src="../src/py_bytes.js"></script>
<script type="text/javascript" src="../src/py_set.js"></script>
<script type="text/javascript" src="../src/js_objects.js"></script>
<script type="text/javascript" src="../src/stdlib_paths.js"></script>
<script type="text/javascript" src="../src/py_import.js"></script>
<script type="text/javascript" src="../src/unicode_data.js"></script>
<script type="text/javascript" src="../src/py_string.js"></script>
<script type="text/javascript" src="../src/py_int.js"></script>
<script type="text/javascript" src="../src/py_long_int.js"></script>
<script type="text/javascript" src="../src/py_float.js"></script>
<script type="text/javascript" src="../src/py_complex.js"></script>
<script type="text/javascript" src="../src/py_dict.js"></script>
<script type="text/javascript" src="../src/py_list.js"></script>
<script type="text/javascript" src="../src/py_generator.js"></script>
<script type="text/javascript" src="../src/py_dom.js"></script>

<script type="text/javascript" src="../src/builtin_modules.js"></script>
<script type="text/javascript" src="../src/py_import_hooks.js"></script>
<script type="text/javascript" src="../src/async.js"></script>

<script type="text/javascript" src="../src/brython_stdlib.js"></script>

<script type="text/python3" src="speed.py">
</script>

<script type="text/python3">
from browser import document
import header

qs_lang, language = header.show()

# other translations

trans = {
    'run':{'en':'run','es':'ejecutar','fr':'exécuter'},
    'clear':{'en':'clear','es':'borrar','fr':'effacer'},
    'test_all':{'en':'Run all tests', 'fr': 'Exécuter tous les tests',
        'es': 'Ejecutar todas las pruebas'}
}

for key in trans:
    if key in document:
        document[key].text = trans[key][language]

</script>

</head>
<body onload="brython({debug:1, cache:'none', static_stdlib_import:true})">

<table id=banner cellpadding=0 cellspacing=0>
<tr id=banner_row >
<td class="logo"><a href="../index.html"><img src="../brython_tp.png" class="logo"></a></td>
</tr>
</table>

<div style="text-align:center">
<br>Brython version: <span id="version"></span>
</div>
</center>


<div id="container">
<div id="left-div">
<div style="padding: 3px 3px 3px 3px;">

Test suite:
<select name="filename" id="files" autocomplete="off">
    <option value="benchmarks/assignment.py">simple assignment</option>
    <option value="benchmarks/augm_assign.py">augmented assignment</option>
    <option value="benchmarks/assignment_float.py">simple assignment to float</option>
    <option value="benchmarks/big_integers.py">big integers</option>
    <option value="benchmarks/build_dict.py">build dictionary</option>
    <option value="benchmarks/add_dict.py">build dictionary 2</option>
    <option value="benchmarks/set_dict_item.py">set dictionary item</option>
    <option value="benchmarks/build_set.py">build set</option>
    <option value="benchmarks/build_list.py">build list</option>
    <option value="benchmarks/set_list_item.py">set list item</option>
    <option value="benchmarks/add_integers.py">integer addition</option>
    <option value="benchmarks/add_strings.py">string addition</option>
    <option value="benchmarks/str_of_int.py">cast int to string</option>
    <option value="benchmarks/create_function_no_arg.py">create function without arguments</option>
    <option value="benchmarks/create_function_single_pos_arg.py">create function, single positional argument</option>
    <option value="benchmarks/create_function_complex_args.py">create function, complex arguments</option>
    <option value="benchmarks/function_call.py">function call</option>
    <option value="benchmarks/function_call_complex.py">function call, complex arguments</option>
    <option value="benchmarks/create_class_simple.py">create simple class</option>
    <option value="benchmarks/create_class_with_init.py">create class with init</option>
    <option value="benchmarks/create_instance_simple_class.py">create instance of simple class</option>
    <option value="benchmarks/create_instance_with_init.py">create instance of class with init</option>
    <option value="benchmarks/call_instance_method.py">call instance method</option>
    <!--
    <option value="benchmarks/pystone.py">pystone</option>
    <option value="benchmarks/bm_ai.py">bm_ai (n-queens)</option>
    -->
</select>
<br><button id="test_all">Run all tests</button>

</div>
  <div id="editor" style="width:100%;"></div>
</div>

<div id="right-div">
<div style="padding: 3px 3px 3px 3px;">
  <div style="float:left">
    <button id="run" disabled>run</button>
    <button id="clear">clear</button>
    debug<input type="checkbox" id="set_debug" checked>
  </div>
  <div style="float:right">
    <button id="show_console">Console</button>
    <button id="show_js">Javascript</button>
  </div>
</div>

<div style="width:100%;height:100%;">
<textarea id="console" autocomplete="off"></textarea>
</div>

</div>
</div>
</body>
</html>

